//
//  AFStackDictionary.h
//  Amber
//
//  Created by Keith Duncan on 28/01/2009.
//  Copyright 2009 thirty-three software. All rights reserved.
//

#import <Foundation/Foundation.h>

/*
	@brief
	A mutable dictionary which allows for the key-value pair to be provided out of sync, and out of order.
 
	@detail
	Each key and object must be provided in unison, if pushing one will increase the count >(count+1) of the other an exception will be thrown.
	It has proved useful in XML parsing, and has helped eliminate parser state.
 */
@interface AFStackDictionary : NSMutableDictionary {
 @private
	NSPointerArray *_keys, *_objects;
}

- (void)pushKey:(id <NSCopying>)key; // Note: keys are copied
- (void)addObject:(id)object;

@end
